<?php
use yii\helpers\Html;
?>
<blockquote class="meta">
<h3><?php echo Html::encode($model->title); ?></h3>
<p>From : <?php echo Html::encode($model->sender->user_name);?></p>
<p>To : <?php echo Html::encode($model->receiver->user_name); ?></p>
<p>Date : <?php echo $model->create_date;?></p>
</blockquote>
<br>
<div class="well"><?php echo $model->messageText->content; ?></div>
<p><a id="next-message"href="<?php echo $nextModel == NULL ? '#':yii::$app->urlManager->createUrl(['message/view','id'=>$nextModel->message_id]);?>" value="<?php echo $nextModel->message_id == NULL ? 'true':'false';?>">Click to next message</a></p>
<?php if($model->receiver_id == yii::$app->user->identity->user_id):?>
<div class="quick-reply">
    <form method="post">
        <div class="row">
            <h5 style="margin-left:30px">Quick Reply:</h5>
		    <textarea id="message-content" name="Message[content]" style="width:800px;height:100px;margin-left:30px"></textarea>
        </div>
        <div class="row">
        <?php echo Html::submitButton(yii::t('Message','Sent'), ['onClick'=>'return sentmessage()', 'class' => 'btn btn-success','style'=>"width:20%;margin-left:30px"]);?>
        </div>
</div>
<?php endif;?>
